package com.spddr.pmos.cxf.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Service;

import com.spddr.pmos.cxf.JaxrsTradeWay;
import com.spddr.pmos.jpa.TradeWay;
import com.spddr.pmos.repos.TradeWayRepos;

/**
 * @author Administrator
 *
 */
@Service
public class JaxrsTradeWayImpl extends AbstractJaxrsObjectImpl<TradeWay> implements JaxrsTradeWay {
	@Autowired
	private TradeWayRepos tradeWayRepos;

	@Override
	public JpaRepository<TradeWay, Long> getRepository() {
		return tradeWayRepos;
	}

	@Override
	public List<TradeWay> children(long id) {
		return tradeWayRepos.findByPidId(id);
	}

	@Override
	public List<TradeWay> findFistChildren(long pid) {
		// TODO Auto-generated method stub
		return tradeWayRepos.findByPidId(pid);
	}

}
